<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>雷达</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">

    <link rel="stylesheet" href="../assets/css/amazeui.min.css?v=2.9">
    <link rel="stylesheet" href="../assets/css/style.css?v=2.3">
    <link rel="stylesheet" href="../assets/css/index.css?v=2.3">
    <link rel="stylesheet" href="../assets/css/extend.css?v=2.3">
    <link rel="stylesheet" href="../assets/css/icons.css?v=2.3">
</head>
<body class="bg-gray">
<div id="main">

    <header data-am-widget="header" class="am-header am-header-default am-header-fixed ">

        <div class="am-header-left am-header-nav">
            <a onclick="history.go(-1)" class="widht-10s">
                <i class="icon_8"></i>
            </a>
        </div>
        <h1 class="am-header-title">
            {{staffInfo.name}}＊公司
        </h1>


    </header>
    <section class="" id="amz-main" data-tag="css-nav">
        <div class="empty-box tow-boxcont"><i class="icon-let01" v-on:click='airadar(staffInfo.open_ai)'></i>
            <p class="friend-mar0 font-color-2">销售雷达</p></div>
        <div class="empty-box tow-boxcont"><i class="icon-let02" v-on:click='bossradar(staffInfo.open_boss)'></i>
            <p class="friend-mar0 font-color-2">老板雷达</p></div>


    </section>

</div>
<script src="../assets/js/jquery.min.js"></script>
<script src="../assets/js/amazeui.min.js"></script>
<script src="https://cdn.bootcss.com/vue/2.2.2/vue.min.js"></script>
<script>
    function getQueryString(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
        var r = window.location.search.substr(1).match(reg);
        if (r != null) return decodeURI(r[2]);
        return null;
    }
    $(function () {
        var userInfo;
        //获取所有朋友圈
        $.ajax({
            type: 'POST',
            url: 'http://127.0.0.1:9001/push/v1.0/ai_user_by_code?code=' + getQueryString("code"),
            contentType: 'application/json',
            success: function (data) {
                userInfo = data;
                //注册vue
                new Vue({
                    el: "#main",
                    data: {
                        staffInfo: data
                    },
                    methods: {
                        airadar: function (ai) {
                            //无权限
                            if (ai==0){
                                window.location.href="C:/Users/kk/Desktop/销售端-html/销售端-html/企业微信/没有权限.html";
                            }else
                            {
                                window.location.href="C:/Users/kk/Desktop/销售端-html/销售端-html/index.html?userid="+data.id;
                            }
                        },
                        bossradar: function (boss) {
                            //无权限
                            if (boss==0){
                                window.location.href="C:/Users/kk/Desktop/销售端-html/销售端-html/企业微信/没有权限.html";
                            }else
                            {
                                window.location.href="C:/Users/kk/Desktop/销售端-html/销售端-html/老板雷达/老板雷达.html?userid="+data.id;
                            }
                        }
                    }


                })
            }
        });
    })
</script>
</body>
</html>